.class public Lrexsee/core/browser/RexseePregFilter;
.super Ljava/lang/Object;
.source "RexseePregFilter.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;


# static fields
.field private static final INTERFACE_NAME:Ljava/lang/String; = "PregFilter"

.field public static final PREG_FILTER_TYPE:Ljava/lang/String; = "preg"

.field public static mIsDebuging:Z


# instance fields
.field private final mBrowser:Lrexsee/core/browser/Browser;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 27
    const/4 v0, 0x0

    sput-boolean v0, Lrexsee/core/browser/RexseePregFilter;->mIsDebuging:Z

    .line 8
    return-void
.end method

.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 0
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 29
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 30
    iput-object p1, p0, Lrexsee/core/browser/RexseePregFilter;->mBrowser:Lrexsee/core/browser/Browser;

    .line 31
    return-void
.end method


# virtual methods
.method public add(Ljava/lang/String;)V
    .locals 2
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 44
    new-instance v0, Lrexsee/core/browser/clazz/PregFilterListener;

    invoke-direct {v0, p1}, Lrexsee/core/browser/clazz/PregFilterListener;-><init>(Ljava/lang/String;)V

    .line 45
    .local v0, "listener":Lrexsee/core/browser/clazz/PregFilterListener;
    iget-object v1, p0, Lrexsee/core/browser/RexseePregFilter;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    invoke-virtual {v1, v0}, Lrexsee/core/browser/RexseeUrl;->addFilter(Lrexsee/core/browser/clazz/FilterListener;)V

    .line 46
    return-void
.end method

.method public addPair(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z
    .locals 3
    .param p1, "name"    # Ljava/lang/String;
    .param p2, "source"    # Ljava/lang/String;
    .param p3, "replacement"    # Ljava/lang/String;

    .prologue
    .line 113
    iget-object v1, p0, Lrexsee/core/browser/RexseePregFilter;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    const-string v2, "preg"

    invoke-virtual {v1, v2, p1}, Lrexsee/core/browser/RexseeUrl;->getFilter(Ljava/lang/String;Ljava/lang/String;)Lrexsee/core/browser/clazz/FilterListener;

    move-result-object v0

    check-cast v0, Lrexsee/core/browser/clazz/PregFilterListener;

    .line 114
    .local v0, "listener":Lrexsee/core/browser/clazz/PregFilterListener;
    if-nez v0, :cond_0

    const/4 v1, 0x0

    .line 117
    :goto_0
    return v1

    .line 116
    :cond_0
    new-instance v1, Lrexsee/core/browser/clazz/PregPair;

    invoke-direct {v1, p2, p3}, Lrexsee/core/browser/clazz/PregPair;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/PregFilterListener;->addPair(Lrexsee/core/browser/clazz/PregPair;)V

    .line 117
    const/4 v1, 0x1

    goto :goto_0
.end method

.method public addUrl(Ljava/lang/String;Ljava/lang/String;)Z
    .locals 3
    .param p1, "name"    # Ljava/lang/String;
    .param p2, "url"    # Ljava/lang/String;

    .prologue
    .line 80
    iget-object v1, p0, Lrexsee/core/browser/RexseePregFilter;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    const-string v2, "preg"

    invoke-virtual {v1, v2, p1}, Lrexsee/core/browser/RexseeUrl;->getFilter(Ljava/lang/String;Ljava/lang/String;)Lrexsee/core/browser/clazz/FilterListener;

    move-result-object v0

    .line 81
    .local v0, "listener":Lrexsee/core/browser/clazz/FilterListener;
    if-nez v0, :cond_0

    const/4 v1, 0x0

    .line 84
    :goto_0
    return v1

    .line 83
    :cond_0
    invoke-virtual {v0, p2}, Lrexsee/core/browser/clazz/FilterListener;->addUrl(Ljava/lang/String;)V

    .line 84
    const/4 v1, 0x1

    goto :goto_0
.end method

.method public clearPairs(Ljava/lang/String;)Z
    .locals 3
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 105
    iget-object v1, p0, Lrexsee/core/browser/RexseePregFilter;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    const-string v2, "preg"

    invoke-virtual {v1, v2, p1}, Lrexsee/core/browser/RexseeUrl;->getFilter(Ljava/lang/String;Ljava/lang/String;)Lrexsee/core/browser/clazz/FilterListener;

    move-result-object v0

    check-cast v0, Lrexsee/core/browser/clazz/PregFilterListener;

    .line 106
    .local v0, "listener":Lrexsee/core/browser/clazz/PregFilterListener;
    if-nez v0, :cond_0

    const/4 v1, 0x0

    .line 109
    :goto_0
    return v1

    .line 108
    :cond_0
    invoke-virtual {v0}, Lrexsee/core/browser/clazz/PregFilterListener;->clearPairs()V

    .line 109
    const/4 v1, 0x1

    goto :goto_0
.end method

.method public clearUrls(Ljava/lang/String;)Z
    .locals 3
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 72
    iget-object v1, p0, Lrexsee/core/browser/RexseePregFilter;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    const-string v2, "preg"

    invoke-virtual {v1, v2, p1}, Lrexsee/core/browser/RexseeUrl;->getFilter(Ljava/lang/String;Ljava/lang/String;)Lrexsee/core/browser/clazz/FilterListener;

    move-result-object v0

    .line 73
    .local v0, "listener":Lrexsee/core/browser/clazz/FilterListener;
    if-nez v0, :cond_0

    const/4 v1, 0x0

    .line 76
    :goto_0
    return v1

    .line 75
    :cond_0
    invoke-virtual {v0}, Lrexsee/core/browser/clazz/FilterListener;->clearUrls()V

    .line 76
    const/4 v1, 0x1

    goto :goto_0
.end method

.method public containsUrl(Ljava/lang/String;Ljava/lang/String;)Z
    .locals 3
    .param p1, "name"    # Ljava/lang/String;
    .param p2, "url"    # Ljava/lang/String;

    .prologue
    .line 88
    iget-object v1, p0, Lrexsee/core/browser/RexseePregFilter;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    const-string v2, "preg"

    invoke-virtual {v1, v2, p1}, Lrexsee/core/browser/RexseeUrl;->getFilter(Ljava/lang/String;Ljava/lang/String;)Lrexsee/core/browser/clazz/FilterListener;

    move-result-object v0

    .line 89
    .local v0, "listener":Lrexsee/core/browser/clazz/FilterListener;
    if-nez v0, :cond_0

    const/4 v1, 0x0

    .line 90
    :goto_0
    return v1

    :cond_0
    invoke-virtual {v0, p2}, Lrexsee/core/browser/clazz/FilterListener;->containsUrl(Ljava/lang/String;)Z

    move-result v1

    goto :goto_0
.end method

.method public exists(Ljava/lang/String;)Z
    .locals 2
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 57
    iget-object v0, p0, Lrexsee/core/browser/RexseePregFilter;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    const-string v1, "preg"

    invoke-virtual {v0, v1, p1}, Lrexsee/core/browser/RexseeUrl;->getFilter(Ljava/lang/String;Ljava/lang/String;)Lrexsee/core/browser/clazz/FilterListener;

    move-result-object v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public get()Ljava/lang/String;
    .locals 2

    .prologue
    .line 54
    iget-object v0, p0, Lrexsee/core/browser/RexseePregFilter;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    const-string v1, "preg"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/RexseeUrl;->getFiltersByType(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 17
    new-instance v0, Lrexsee/core/browser/RexseePregFilter;

    invoke-direct {v0, p1}, Lrexsee/core/browser/RexseePregFilter;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 13
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/core/browser/RexseePregFilter;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "PregFilter"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 21
    new-instance v0, Lrexsee/core/browser/RexseePregFilter;

    invoke-direct {v0, p1}, Lrexsee/core/browser/RexseePregFilter;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public getNumberOfPairs(Ljava/lang/String;)I
    .locals 3
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 100
    iget-object v1, p0, Lrexsee/core/browser/RexseePregFilter;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    const-string v2, "preg"

    invoke-virtual {v1, v2, p1}, Lrexsee/core/browser/RexseeUrl;->getFilter(Ljava/lang/String;Ljava/lang/String;)Lrexsee/core/browser/clazz/FilterListener;

    move-result-object v0

    check-cast v0, Lrexsee/core/browser/clazz/PregFilterListener;

    .line 101
    .local v0, "listener":Lrexsee/core/browser/clazz/PregFilterListener;
    if-nez v0, :cond_0

    const/4 v1, 0x0

    .line 102
    :goto_0
    return v1

    :cond_0
    invoke-virtual {v0}, Lrexsee/core/browser/clazz/PregFilterListener;->getNumberOfPairs()I

    move-result v1

    goto :goto_0
.end method

.method public getNumberOfUrls(Ljava/lang/String;)I
    .locals 3
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 67
    iget-object v1, p0, Lrexsee/core/browser/RexseePregFilter;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    const-string v2, "preg"

    invoke-virtual {v1, v2, p1}, Lrexsee/core/browser/RexseeUrl;->getFilter(Ljava/lang/String;Ljava/lang/String;)Lrexsee/core/browser/clazz/FilterListener;

    move-result-object v0

    .line 68
    .local v0, "listener":Lrexsee/core/browser/clazz/FilterListener;
    if-nez v0, :cond_0

    const/4 v1, 0x0

    .line 69
    :goto_0
    return v1

    :cond_0
    invoke-virtual {v0}, Lrexsee/core/browser/clazz/FilterListener;->getNumberOfUrls()I

    move-result v1

    goto :goto_0
.end method

.method public getPairs(Ljava/lang/String;)Ljava/lang/String;
    .locals 3
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 95
    iget-object v1, p0, Lrexsee/core/browser/RexseePregFilter;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    const-string v2, "preg"

    invoke-virtual {v1, v2, p1}, Lrexsee/core/browser/RexseeUrl;->getFilter(Ljava/lang/String;Ljava/lang/String;)Lrexsee/core/browser/clazz/FilterListener;

    move-result-object v0

    check-cast v0, Lrexsee/core/browser/clazz/PregFilterListener;

    .line 96
    .local v0, "listener":Lrexsee/core/browser/clazz/PregFilterListener;
    if-nez v0, :cond_0

    const-string v1, "[]"

    .line 97
    :goto_0
    return-object v1

    :cond_0
    invoke-virtual {v0}, Lrexsee/core/browser/clazz/PregFilterListener;->getPairs()Ljava/lang/String;

    move-result-object v1

    goto :goto_0
.end method

.method public getUrls(Ljava/lang/String;)Ljava/lang/String;
    .locals 3
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 62
    iget-object v1, p0, Lrexsee/core/browser/RexseePregFilter;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    const-string v2, "preg"

    invoke-virtual {v1, v2, p1}, Lrexsee/core/browser/RexseeUrl;->getFilter(Ljava/lang/String;Ljava/lang/String;)Lrexsee/core/browser/clazz/FilterListener;

    move-result-object v0

    .line 63
    .local v0, "listener":Lrexsee/core/browser/clazz/FilterListener;
    if-nez v0, :cond_0

    const-string v1, "[]"

    .line 64
    :goto_0
    return-object v1

    :cond_0
    invoke-virtual {v0}, Lrexsee/core/browser/clazz/FilterListener;->getUrls()Ljava/lang/String;

    move-result-object v1

    goto :goto_0
.end method

.method public isDebuging()Z
    .locals 1

    .prologue
    .line 39
    sget-boolean v0, Lrexsee/core/browser/RexseePregFilter;->mIsDebuging:Z

    return v0
.end method

.method public remove(Ljava/lang/String;)V
    .locals 2
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 48
    iget-object v0, p0, Lrexsee/core/browser/RexseePregFilter;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    const-string v1, "preg"

    invoke-virtual {v0, v1, p1}, Lrexsee/core/browser/RexseeUrl;->removeFilters(Ljava/lang/String;Ljava/lang/String;)V

    .line 49
    return-void
.end method

.method public setDebuging(Z)V
    .locals 0
    .param p1, "debuging"    # Z

    .prologue
    .line 36
    sput-boolean p1, Lrexsee/core/browser/RexseePregFilter;->mIsDebuging:Z

    .line 37
    return-void
.end method

.method public size()I
    .locals 2

    .prologue
    .line 51
    iget-object v0, p0, Lrexsee/core/browser/RexseePregFilter;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    const-string v1, "preg"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/RexseeUrl;->getFilterSizeByType(Ljava/lang/String;)I

    move-result v0

    return v0
.end method
